<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Mall_label.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/Mall_label.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    import VolForm from "@/components/basic/VolForm.vue";
    
    var vueParam = {
        components: {
            ViewGrid,
           VolForm
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '标签设置',
                    name: 'Mall_label',
                    url: "/Labels/",
                    sortName: "createDate"
                },
                extend: extend,
                editFormFields: {"labelCode":"","labelName":"","modifyDate":"","createDate":"","modifyID":"","createID":"","modifier":"","creator":"","isAvailable":"","sort":"","merchantCode":"","merchantName":""},
                editFormOptions: [ 
                                [{"title":"标签名称","required":true,"field":"labelName","type":"text",colSize:12},],
                                [{"title":"标签编码","field":"labelCode","type":"text",hidden:true},
                                {"title":"排序","required":true,"field":"sort","type":"text"}, {"title":"是否可用","required":true,"field":"isAvailable","type":"switch","dataKey":"enable"},]],
                searchFormFields: {"labelName":"","isAvailable":"","creator":""},
                searchFormOptions: [[{"title":"标签名称","field":"labelName","type":"like"},{"title":"是否可用","field":"isAvailable","type":"select","dataKey":"enable"},{"title":"创建人","field":"creator","type":"like"}],[{"title":"排序","field":"sort","type":"like"}]],
                columns: [{field:'id',title:'主键',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                        //{field:'labelCode',title:'标签编码',type:'string',width:220,align:'left',sortable:true},
                       {field:'labelName',title:'标签名称',type:'string',width:220,align:'left',sortable:true},
                       {field:'isAvailable',title:'是否可用',bind: { key: 'enable', data: [] },type:'int',width:90,align:'left'},
                       {field:'sort',title:'排序',type:'string',width:40,align:'left',sortable:true},
                       {field:'modifier',title:'修改人',type:'string',width:80,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:80,align:'left'}],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
